package business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.http.HTTPService;
	
	public class WhoDataDelegate
	{
		private var responder : IResponder;
		private var service: HTTPService;
		
		public function WhoDataDelegate(responder:IResponder) {
			this.responder = responder;
		}

		public function loadWhoData(servicename:String):void {
			this.service = ServiceLocator.getInstance().getHTTPService(servicename);
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}
		
		/*
		public function load_wfa_boys():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_wfa_boys");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}

		public function load_wfa_girls():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_wfa_girls");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}
		
		public function load_lhfa_boys():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_lhfa_boys");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}

		public function load_lhfa_girls():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_lhfa_girls");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}
		
		public function load_hcfa_boys():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_hcfa_boys");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}

		public function load_hcfa_girls():void {
			this.service = ServiceLocator.getInstance().getHTTPService("load_hcfa_girls");
			var call:AsyncToken = service.send();
			call.addResponder(responder);
		}
		*/
	}
}